Constrained Polymorphic Types for a Calculus with Name Variables
نویسندگان
چکیده
We extend the simply-typed lambda-calculus with a mechanism for dynamic rebinding of code based on parametric nominal interfaces. That is, we introduce values which represent single fragments, or families of named fragments, of open code, where free variables are associated with names which do not obey α-equivalence. In this way, code fragments can be passed as function arguments and manipulated, through their nominal interface, by operators such as rebinding, overriding and renaming. Moreover, by using name variables, it is possible to write terms which are parametric in their nominal interface and/or in the way it is adapted, greatly enhancing expressivity. However, in order to prevent conflicts when instantiating name variables, the namepolymorphic types of such terms need to be equipped with simple inequality constraints. We show soundness of the type system. 1998 ACM Subject Classification D.3.1 Programming Languages: Formal Definitions and Theory, D.3.3 Programming Languages: Language Constructs and Features
منابع مشابه
Incremental rebinding with name polymorphism 1 Davide Ancona
We propose an extension with name variables of a calculus for incremental rebinding of code introduced in previous work. Names, which can be either constants or variables, are used as interface of fragments of code with free variables. Open code can be dynamically rebound by applying a rebinding, which is an association from names to terms. Rebindings can contain free variables as well, hence r...
متن کاملSubtyping Constrained Types
A constrained type is a type that comes with a set of subtyping constraints on variables occurring in the type. Constrained type inference systems are a natural generalization of Hindley/Milner type inference to languages with subtyping. This paper develops several subtyping relations on polymorphic constrained types of a general form that allows recursive constraints and multiple bounds on typ...
متن کاملInference of polymorphic and conditional strictness propertiesThomas
We deene an inference system for modular strictness analysis of functional programs by extending a conjunctive strictness logic with polymorphic and conditional properties. This extended set of properties is used to deene a syntax-directed, polymorphic strictness analysis based on polymorphic recur-sion whose soundness is established via a translation from the polymorphic system into the conjun...
متن کاملA Calculus of Tagged Types, with applications to process languages
Tagged Types encode some families of types indexed by labels. Like Wand’s row types, they make use of specific variables from which new fields can be extracted, and like Rémy’s record types, the types introduced in these fields can be parameterized. However, the logical and technical treatment of tagged types is original; it is claimed that they combine the intuitiveness of row types with most ...
متن کاملOperational Properties of Lily, a Polymorphic Linear Lambda Calculus with Recursion
Plotkin has advocated the combination of linear lambda calculus, polymorphism and fixed point recursion as an expressive semantic metalanguage. We study its expressive power from an operational point of view. We show that the naturally call-by-value operators of linear lambda calculus can be given a call-by-name semantics without affecting termination at exponential types and hence without affe...
متن کامل